package com.qmds.userserver.user.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmds.common.core.entity.SmsLog;
import com.qmds.common.core.vo.R;
import com.qmds.userserver.user.dao.SmsLogMapper;
import com.qmds.userserver.user.service.SmsLogService;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;

/**
 * 短信发送表(SmsLog)表服务实现类
 *
 * @author makejava
 * @since 2024-08-12 17:35:18
 */
@Service("smsLogService")
public  class SmsLogServiceImpl extends ServiceImpl<SmsLogMapper, SmsLog> implements SmsLogService {
    @Resource
    private SmsLogMapper smsLogMapper;

    @Override
    public R queryByPhone(String phone) {
        return R.ok(smsLogMapper.selectList(new LambdaQueryWrapper<SmsLog>().like(SmsLog::getPhone,phone).orderByDesc(SmsLog::getCreateTime)));
    }
}

